package demo1;
public class Computer {
    private String cpu; //cpu
    private String memory;  //内存
    public String screen;   //屏幕
    String brand;   //品牌（没写限定符时默认为default）
    public Computer(String brand,String cpu,String memory,String screen){
        this.brand = brand;
        this.cpu = cpu;
        this.memory = memory;
        this.screen = screen;
    }
    public void poweron(){
        System.out.println("开机");
    }
    public void poweroff(){
        System.out.println("关机");
    }
}


